package com.example.app.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.example.common.config.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author youbug
 * @since 2023-10-21
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class Song extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private Integer singerId;

    private String name;

    private String introduction;

    private Integer dt;

    private String pic;
    @TableField(exist = false)
    private String picUrl;

    private String lyric;

    private String url;
    @TableField(exist = false)
    private List<Ar> ar;

    @TableField(exist = false)
    private Al al = new Al();

    {
        ar = new ArrayList<>(1);
        ar.add(new Ar());
    }

    public static class Al{
        private String name;
        private String picUrl;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getPicUrl() {
            return picUrl;
        }

        public void setPicUrl(String picUrl) {
            this.picUrl = picUrl;
        }
    }
    public static class Ar{
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }
}

